//package com.eastfair.gateway.rocket;
//
//import cn.hutool.core.date.LocalDateTimeUtil;
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import com.eastfair.cache.repository.CachePlusOps;
//import com.eastfair.core.point.BusinBasePoint;
//import com.eastfair.core.utils.DateUtils;
//import com.eastfair.gateway.dto.BackListDTO;
//import com.eastfair.gateway.service.BackListService;
//import com.eastfair.mq.model.MySimpleMessage;
//import com.eastfair.mq.service.AbstractPointService;
//import com.eastfair.mq.service.BusinessPointService;
//import com.eastfair.point.PointKeyDefinition;
//import com.eastfair.point.business.auth.BusinUpdUserPoint;
//import com.eastfair.point.business.gateway.BusinBalckPoint;
//import com.fasterxml.jackson.databind.ObjectMapper;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.BeanUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.io.IOException;
//import java.time.LocalDateTime;
//import java.time.Month;
//
//
///**
// * <p>
// * 单业务处理事件
// * </p>
// *
// * @author ligang
// * @date 2021-08-10
// */
//@Slf4j
//@Service
//public class BusinessPointServiceImpl extends AbstractPointService implements BusinessPointService {
//    @Autowired
//    private BackListService backListService;
//
//    @Override
//    public void executeBusin(MySimpleMessage mySimpleMessage) {
//        BusinBasePoint businBasePoint = JSONObject.parseObject(JSONObject.toJSONString(mySimpleMessage.getPayload()), BusinBasePoint.class);
//        JSONObject jsonObject = (JSONObject) businBasePoint.getPointObj();
//        String businPointName = jsonObject.getString("pointName");
//        JSONObject startTime = jsonObject.getJSONObject("startTime");
//        JSONObject endTime = jsonObject.getJSONObject("endTime");
//        if (businPointName.equals(PointKeyDefinition.GATEWAY_BLACK)) {
//            //用户锁定
//            BusinBalckPoint businBalckPoint = JSON.parseObject(businBasePoint.getPointObj().toString(), BusinBalckPoint.class);
//            BackListDTO backListDTO = new BackListDTO();
//            BeanUtils.copyProperties(businBalckPoint, backListDTO);
//            backListService.executeAddBackList(backListDTO,DateUtils.getLocalTime(startTime),DateUtils.getLocalTime(endTime));
//        }
//    }
//
//}
